<?php

namespace app\command;

use app\common\lib\Common;
use app\logic\cron\HuitunLogic;
use bootstrap\DBListen;
use Webman\Config;
use app\common\lib\BaseCommand;
use app\logic\cron\DouyinLogic;
use app\logic\cron\UserLogic;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Event\ConsoleEvent;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;
use Webman\Event\Event;


class CronCutLog extends Command
{
    protected static $defaultName = 'cron:cut:log';
    protected static $defaultDescription = 'cron cut log';

    /**
     * @return void
     */
    protected function configure()
    {
        //$this->addArgument('name', InputArgument::OPTIONAL, 'Name description');
        Common::initTaskConfig();
    }

    /**
     * @param InputInterface $input
     * @param OutputInterface $output
     * @return int
     */
    protected function execute(InputInterface $input, OutputInterface $output): int
    {
       $logs = ['exception','sql','request','request','console_sql','console_exception','data','queue_exception','queue_error'];
       foreach ($logs as $log){

       }
//        switch ($file){
//            case 'exception':
//                $logFile = runtime_path('logs'.DIRECTORY_SEPARATOR.'exception'.DIRECTORY_SEPARATOR.'log-'.date('Y-m-d').'.html');
//                break;
//            case 'sql':
//                $logFile = runtime_path('logs'.DIRECTORY_SEPARATOR.'sql'.DIRECTORY_SEPARATOR.'log-'.date('Y-m-d').'.html');
//                break;
//            case 'request':
//                $logFile = runtime_path('logs'.DIRECTORY_SEPARATOR.'request'.DIRECTORY_SEPARATOR.'log-'.date('Y-m-d').'.html');
//                break;
//            case 'console_sql':
//                $logFile = runtime_path('logs'.DIRECTORY_SEPARATOR.'console_sql'.DIRECTORY_SEPARATOR.'log-'.date('Y-m-d').'.html');
//                break;
//            case 'console_exception':
//                $logFile = runtime_path('logs'.DIRECTORY_SEPARATOR.'console_exception'.DIRECTORY_SEPARATOR.'log-'.date('Y-m-d').'.html');
//                break;
//            case 'data':
//                $logFile = runtime_path('logs'.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'log-'.date('Y-m-d').'.html');
//                break;
//            case 'queue_exception':
//                $logFile = runtime_path('logs'.DIRECTORY_SEPARATOR.'queue_exception'.DIRECTORY_SEPARATOR.'log-'.date('Y-m-d').'.html');
//                break;
//            case 'queue_error':
//                $logFile = runtime_path('logs'.DIRECTORY_SEPARATOR.'queue_error'.DIRECTORY_SEPARATOR.'log-'.date('Y-m-d').'.html');
//                break;
//            default:
//                $logFile = '';
//        }


    }


}
